package com.example.mapper;

import com.example.entity.DataTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DataTableMapper {
    @Select("SELECT id, table_code as tableCode, table_name as tableName, description, created_at as createdAt FROM data_table_catalog")
    List<DataTable> findAll();
    
    @Select("SELECT * FROM data_table_catalog WHERE table_code = #{tableCode}")
    DataTable findByCode(String tableCode);
}